@component('components.alert')@endcomponent

@if(!is_null($user->email))
    当前邮箱: {{$user->email}}
@endif
<form action="{{route('center.security.email')}}" method="post">
    {{csrf_field()}}
    验证码: <input type="text" name="sms_code" value="{{old('sms_code')}}">
    <a href="{{route('send-sms-code',user()->mobile)}}" target="_blank">发送验证码</a>
    @if($errors->has('sms_code'))
        {{$errors->first('sms_code')}}
    @endif
    <br/>
    @if(!is_null($user->email))
        邮箱地址:
    @else
        新邮箱地址:
    @endif
    <input type="text" name="email" value="{{old('email')}}">
    @if($errors->has('email'))
        {{$errors->first('email')}}
    @endif
    <br/>
    <button type="submit">发送验证邮件</button>
</form>
